package projects.ufam.nodes.messages;

import sinalgo.nodes.Node;
import sinalgo.nodes.messages.Message;

public class AodvRrepMessage extends Message {
	static int _id = 0;
	private int id, hops;
	private Node src, dst;

	public AodvRrepMessage() {
		super();
	}

	public int getId() {
		return id;
	}

	public AodvRrepMessage(Node src, Node dst, int hops) {
		super();
		this.id = _id++;
		this.src = src;
		this.dst = dst;
		this.hops = hops;
	}

	@Override
	public Message clone() {
		Message m = new AodvRrepMessage(src, dst, hops);
		_id--;
		return m;
	}

	@Override
	public int getMessageSize() {
		return 1;
	}

	public int getHops() {
		return hops;
	}

	public void setHops(int hops) {
		this.hops = hops;
	}

	public Node getSrc() {
		return src;
	}

	public void setSrc(Node src) {
		this.src = src;
	}

	public Node getDst() {
		return dst;
	}

	public void setDst(Node dst) {
		this.dst = dst;
	}

	public void setId(int id) {
		this.id = id;
	}

}